<?$this->load->view('admin/header');?>
<!-- Content Area -->
<div id="middlepart">
    <!-- Left column -->
    <div id="leftcolumn">
        <h1>Spam Management</h1>

        <?$this->load->view('admin/system_messages');?>

        <?=form_open($this->uri->uri_string());?>

        <div style="float: right;"><input type="submit" name="btn_delete_all_spam" value="Delete ALL Spam Comments"></div>

        <!-- Tables 1 -->
        <table border="0" cellspacing="0" cellpadding="0" width="100%">
            <thead>
                <tr>
                    <th><input type="checkbox" id="toggle_checkboxes" name="toggle_all"></th>
                    <th>ID</th>
                    <th>Date</th>
                    <th>Author</th>
                    <th>Post Title</th>
                    <th>Comment</th>
                    <th>Actions</th>
                </tr>
            </thead>
            <tbody>
                <?foreach ($this->mdl_comments->get(array('paginate'=>TRUE, 'show_spam'=>TRUE)) as $comment) {?>
                <tr>
                    <td><input type="checkbox" name="spam_mass_select[<?=$comment->comment_id;?>]" value="<?=$comment->comment_id;?>" class="toggle_box"></td>
                    <td><?=$comment->comment_id;?></td>
                    <td><?=$this->inktype->format_date($comment->comment_date, 2);?></td>
                    <td><?=$comment->display_name;?></td>
                    <td><?=$comment->title;?></td>
                    <td><?=character_limiter($comment->comment, 75);?></td>
                    <td width="175px">
                            <?=anchor('admin_spam/not_spam/comment_id/' . $comment->comment_id, 'not spam', array('class'=>'edit'));?>
                            <?=anchor('admin_spam/delete/comment_id/' . $comment->comment_id, 'delete', array('class'=>'delete', 'onclick'=>$this->inktype->verify_delete()));?>
                    </td>
                </tr>
                <?}?>
                <tr>
                    <td colspan="7" style="text-align: left;">
                        <select name="mass_spam_actions">
                            <option value="0" selected>Mass Spam Actions</option>
                            <option value="delete_selected">Delete Selected</option>
                            <option value="not_spam">Mark Selected as Not Spam</option>
                        </select> <input type="submit" name="btn_submit_spam_action" value="Submit">
                    </td>
                </tr>
            </tbody>
        </table>
        <!-- Tables 1 -->

        </form>

        <br />
        <div style="text-align: center;"><?=$this->mdl_comments->page_links;?></div>
        <br />
    </div>
    <!-- Left Column -->

</div>
<!-- Content -->

<?$this->load->view('admin/footer');?>